a package that collects several modules for working with URLs

request

defines functions and classes which help in opening URLs

urlopen

import re
from urllib.request import urlopen
url = "https://www.python.org/downloads/mac-osx/"
page = urlopen(url)  # returns an HTTPResponse object
html = page.read().decode("utf-8")  # read bytes and decode
type(html)
#  <class 'str'>
len(html)
#  161550
re.findall("Latest Python 3 Release - Python (3\.\d+\.\d+)", html)[0]
#  '3.8.5'

error


parse


robotparser